from selenium.webdriver.common.by import By
from base import Base


class Page(Base):
    def sousuo(self):
        loc=(By.XPATH,'//android.widget.TextView[@resource-id="cn.xuexi.android:id/text"]')
        ele=self.devices.find_element(loc)
        return ele
    def shuru(self):
        loc=(By.CLASS_NAME,'android.widget.EditText')
        ele=self.devices.find_element(loc)
        return ele
    def xuanze(self):
        loc=(By.ID,'cn.xuexi.android:id/tv_suggest_name')
        ele=self.devices.find_element(loc)
        return ele
    def shousuo2(self):
        loc=(By.XPATH,'//android.widget.TextView[@resource-id="cn.xuexi.android:id/text"]')
        ele=self.devices.find_element(loc)
        return ele
    def shuru2(self):
        loc=(By.ID,'android:id/search_src_text')
        ele=self.devices.find_element(loc)
        return ele
    def xuanze2(self):
        loc=(By.XPATH,'//android.widget.TextView[@resource-id="cn.xuexi.android:id/tv_suggest_name"]')
        ele=self.devices.find_element(loc)
        return ele
    def saixuan(self):
        loc=(By.CLASS_NAME,'android.widget.Image')
        ele=self.devices.find_element(loc)
        return ele
    def fanhui2(self):
        loc=(By.ID,'cn.xuexi.android:id/search_back')
        ele=self.devices.find_element(loc)
        return ele
    def dianji3(self):
        loc=(By.XPATH,'//android.widget.TextView[@text="北京"]')
        ele=self.devices.find_element(loc)
        return ele
    def qiehuan3(self):
        loc=(By.XPATH,'//android.widget.TextView[@text="切换地区"]')
        ele=self.devices.find_element(loc)
        return ele
    def xuanz3(self):
        loc=(By.XPATH,'//android.widget.TextView[@resource-id="cn.xuexi.android:id/label_group_normal" and @text="河北"]')
        ele=self.devices.find_element(loc)
        return ele
    def wode(self):
        loc=(By.ID,'cn.xuexi.android:id/comm_head_xuexi_mine')
        ele=self.devices.find_element(loc)
        return ele
    def fan(self):
        loc=(By.ID,'cn.xuexi.android:id/search_back')
        ele=self.devices.find_element(loc)
        return ele
    def fanh(self):
        loc=(By.ID,'cn.xuexi.android:id/search_back')
        ele=self.devices.find_element(loc)
        return ele
